package com.eiisan.user.web.feign;

import com.eiisan.core.util.api.Result;
import com.eiisan.user.feign.UserClientApi;
import com.eiisan.user.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: 用户服务 Feign实现类
 * @Author: gragonfly
 * @Date: 2019/6/21
 */
@RestController
@Api(tags = "API - UserFeign")
public class UserClient implements UserClientApi {

    @Autowired
    UserService userService;

    @Override
    @ApiOperation(httpMethod = "POST", value = "查询手机号是否存在")
    public Result<Boolean> checkMobile(@RequestParam String mobile) {
        return userService.checkMobile(mobile);
    }
}
